From 00bee25b4bd0e0fb9165301a70e8c476244df8a6 Mon Sep 17 00:00:00 2001 From: STRWarrior Date: Sat, 13 Dec 2014 15:38:37 +0100 Subject: WormNestCaves occasionally generates sandstone around the cave Only when the block around the cave is sand. --- src/Generating/Caves.cpp | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/src/Generating/Caves.cpp b/src/Generating/Caves.cpp index e4735cb83..1e8dbef90 100644 --- a/src/Generating/Caves.cpp +++ b/src/Generating/Caves.cpp @@ -100,6 +100,7 @@ public: void ProcessChunk( int a_ChunkX, int a_ChunkZ, cChunkDef::BlockTypes & a_BlockTypes, + cChunkDesc::BlockNibbleBytes & a_BlockMetas, cChunkDef::HeightMap & a_HeightMap ); @@ -455,6 +456,7 @@ void cCaveTunnel::CalcBoundingBox(void) void cCaveTunnel::ProcessChunk( int a_ChunkX, int a_ChunkZ, cChunkDef::BlockTypes & a_BlockTypes, + cChunkDesc::BlockNibbleBytes & a_BlockMetas, cChunkDef::HeightMap & a_HeightMap ) { @@ -505,6 +507,22 @@ void cCaveTunnel::ProcessChunk( cChunkDef::SetBlock(a_BlockTypes, x, y, z, E_BLOCK_AIR); } } + else if (SqDist <= SqRad * 2) + { + if (cChunkDef::GetBlock(a_BlockTypes, x, y, z) == E_BLOCK_SAND) + { + int Index = cChunkDef::MakeIndexNoCheck(x, y, z); + if (a_BlockMetas[Index] == 1) + { + a_BlockMetas[Index] = 0; + cChunkDef::SetBlock(a_BlockTypes, x, y, z, E_BLOCK_RED_SANDSTONE); + } + else + { + cChunkDef::SetBlock(a_BlockTypes, x, y, z, E_BLOCK_SANDSTONE); + } + } + } } // for y } // for x, z } // for itr - m_Points[] @@ -596,11 +614,12 @@ void cStructGenWormNestCaves::cCaveSystem::DrawIntoChunk(cChunkDesc & a_ChunkDes { int ChunkX = a_ChunkDesc.GetChunkX(); int ChunkZ = a_ChunkDesc.GetChunkZ(); - cChunkDef::BlockTypes & BlockTypes = a_ChunkDesc.GetBlockTypes(); - cChunkDef::HeightMap & HeightMap = a_ChunkDesc.GetHeightMap(); + cChunkDef::BlockTypes & BlockTypes = a_ChunkDesc.GetBlockTypes(); + cChunkDef::HeightMap & HeightMap = a_ChunkDesc.GetHeightMap(); + cChunkDesc::BlockNibbleBytes & BlockMetas = a_ChunkDesc.GetBlockMetasUncompressed(); for (cCaveTunnels::const_iterator itr = m_Tunnels.begin(), end = m_Tunnels.end(); itr != end; ++itr) { - (*itr)->ProcessChunk(ChunkX, ChunkZ, BlockTypes, HeightMap); + (*itr)->ProcessChunk(ChunkX, ChunkZ, BlockTypes, BlockMetas, HeightMap); } // for itr - m_Tunnels[] } -- cgit v1.2.3 From 3d9c88affa41d3b35698ef51161a908b0f53780b Mon Sep 17 00:00:00 2001 From: Tycho Date: Sat, 13 Dec 2014 20:58:28 +0000 Subject: "Don't set compiler to gcc on clang builds" --- .travis.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4e8377748..031e358d0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,13 +7,14 @@ before_install: - if [ "$TRAVIS_MCSERVER_BUILD_TYPE" == "COVERAGE" ]; then sudo pip install cpp_coveralls; fi # g++4.8 - - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test - - sudo apt-get update -qq + - if [ "$CXX" = "g++"]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; fi + - if [ "$CXX" = "g++"]; sudo apt-get update -qq; fi install: # g++4.8 - - sudo apt-get install -qq g++-4.8 - - export CXX="g++-4.8" + - if [ "$CXX" = "g++"]; sudo apt-get install -qq g++-4.8; fi + - if [ "$CXX" = "g++"]; export CXX="g++-4.8"; fi + - if [ "$CXX" = "g++"]; export CC="gcc-4.8"; fi # Build MCServer script: ./CIbuild.sh -- cgit v1.2.3 From 0e1ef05ea8ad82c5828a8eb50fdec4d58d8e6609 Mon Sep 17 00:00:00 2001 From: Tycho Date: Sat, 13 Dec 2014 21:22:15 +0000 Subject: Fix forgoten thens --- .travis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 031e358d0..4627f117c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,13 +8,13 @@ before_install: # g++4.8 - if [ "$CXX" = "g++"]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; fi - - if [ "$CXX" = "g++"]; sudo apt-get update -qq; fi + - if [ "$CXX" = "g++"]; then sudo apt-get update -qq; fi install: # g++4.8 - - if [ "$CXX" = "g++"]; sudo apt-get install -qq g++-4.8; fi - - if [ "$CXX" = "g++"]; export CXX="g++-4.8"; fi - - if [ "$CXX" = "g++"]; export CC="gcc-4.8"; fi + - if [ "$CXX" = "g++"]; then sudo apt-get install -qq g++-4.8; fi + - if [ "$CXX" = "g++"]; then export CXX="g++-4.8"; fi + - if [ "$CXX" = "g++"]; then export CC="gcc-4.8"; fi # Build MCServer script: ./CIbuild.sh -- cgit v1.2.3 From 946adeac3b7d7a3febbf6edf118ace9dee7a13fa Mon Sep 17 00:00:00 2001 From: Tycho Date: Sat, 13 Dec 2014 21:26:38 +0000 Subject: Double equals --- .travis.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4627f117c..30926b5bd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,14 +7,14 @@ before_install: - if [ "$TRAVIS_MCSERVER_BUILD_TYPE" == "COVERAGE" ]; then sudo pip install cpp_coveralls; fi # g++4.8 - - if [ "$CXX" = "g++"]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; fi - - if [ "$CXX" = "g++"]; then sudo apt-get update -qq; fi + - if [ "$CXX" == "g++"]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; fi + - if [ "$CXX" == "g++"]; then sudo apt-get update -qq; fi install: # g++4.8 - - if [ "$CXX" = "g++"]; then sudo apt-get install -qq g++-4.8; fi - - if [ "$CXX" = "g++"]; then export CXX="g++-4.8"; fi - - if [ "$CXX" = "g++"]; then export CC="gcc-4.8"; fi + - if [ "$CXX" == "g++"]; then sudo apt-get install -qq g++-4.8; fi + - if [ "$CXX" == "g++"]; then export CXX="g++-4.8"; fi + - if [ "$CXX" == "g++"]; then export CC="gcc-4.8"; fi # Build MCServer script: ./CIbuild.sh -- cgit v1.2.3 From aef36a5c19e4485cb42c261fc9475ac53cb91722 Mon Sep 17 00:00:00 2001 From: Tycho Date: Sat, 13 Dec 2014 21:33:16 +0000 Subject: final syntax errors --- .travis.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 30926b5bd..eaf8f116a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,14 +7,13 @@ before_install: - if [ "$TRAVIS_MCSERVER_BUILD_TYPE" == "COVERAGE" ]; then sudo pip install cpp_coveralls; fi # g++4.8 - - if [ "$CXX" == "g++"]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; fi - - if [ "$CXX" == "g++"]; then sudo apt-get update -qq; fi + - if [ "$CXX" == "g++" ]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; fi + - if [ "$CXX" == "g++" ]; then sudo apt-get update -qq; fi install: # g++4.8 - - if [ "$CXX" == "g++"]; then sudo apt-get install -qq g++-4.8; fi - - if [ "$CXX" == "g++"]; then export CXX="g++-4.8"; fi - - if [ "$CXX" == "g++"]; then export CC="gcc-4.8"; fi + - if [ "$CXX" == "g++" ]; then sudo apt-get install -qq g++-4.8; fi + - if [ "$CXX" == "g++" ]; then export CXX="g++-4.8"; export CC="gcc-4.8"; fi # Build MCServer script: ./CIbuild.sh -- cgit v1.2.3 From 7542255d5c90b907016b8e2cb84ccb82af809181 Mon Sep 17 00:00:00 2001 From: Tycho Date: Sat, 13 Dec 2014 22:09:37 +0000 Subject: Clang needs the libstdc++ that comes with gcc-4.8 --- .travis.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index eaf8f116a..26e74c1b2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,12 +7,14 @@ before_install: - if [ "$TRAVIS_MCSERVER_BUILD_TYPE" == "COVERAGE" ]; then sudo pip install cpp_coveralls; fi # g++4.8 - - if [ "$CXX" == "g++" ]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; fi - - if [ "$CXX" == "g++" ]; then sudo apt-get update -qq; fi + - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test + - sudo apt-get update -qq install: + # g++4.8 and clang + - sudo apt-get install -qq g++-4.8 + # g++4.8 - - if [ "$CXX" == "g++" ]; then sudo apt-get install -qq g++-4.8; fi - if [ "$CXX" == "g++" ]; then export CXX="g++-4.8"; export CC="gcc-4.8"; fi # Build MCServer -- cgit v1.2.3